#coding=utf-8 
from django.shortcuts import render_to_response
from stock.models import *
def share_details(request, c):
    s = Share.objects.get(code=c)
    eds = s.exday_set.order_by('-date')[:20]
    ps = [e.price for e in eds]
    return render_to_response('share_details.html', {'share':s, 'prices':ps})